package com.springclass;

public class MessageLooper {
	
	private Messager messager;
	private int x;
	
	public Messager getMessager() {
		return messager;
	}
	public void setMessager(Messager messager) {
		this.messager = messager;
	}
	public int getNumTimes() {  
		return x;
	}
	public void setNumTimes(int numTimes) {
		this.x = numTimes;
	}
	
	public void doIt()
	{
		for (int i=0; i<x; i++)
			messager.greet();
	}
	

}
